package com.system.utils;
import com.system.mapper.PinkeMapper;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import java.util.List;
import java.util.Map;
public class JdbcUtil implements ApplicationContextAware {
	// public static BaseDAO baseDAO;
	public static PinkeMapper pinkeMapper;
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		//JdbcUtil.messageCollectDAO = (MessageCollectDAO) context.getBean("messageCollectDAO");
		JdbcUtil.pinkeMapper = (PinkeMapper) applicationContext.getBean("pinkeMapper");
		System.out.println("applicationContext:"+applicationContext);
	}
	public static void main(String[] args) {
		System.out.println(JdbcUtil.pinkeMapper.selectAll());
	}
}
